<template>
    <div class="chat-item">
        <chat-me v-if="data.from == 'me'" :msg="data"></chat-me>
        <chat-he v-else :msg="data" :heUser="heUser"></chat-he>
    </div>
</template>

<script>
import ChatMe from './Me'
import ChatHe from './He'
export default {
    name: 'ChatItem',
    components: {
        ChatMe,
        ChatHe
    },
    props: {
        data: {
            type: Object
        },
        heUser: {
            type: Object
        }
    }
}
</script>